package com.cancer.biz.base.entity;

import java.util.Date;

public class SysParam {
    private Long paramId;

    private String paramKey;

    private String paramValue;
    
    private Integer paramInt;

    private String paramType;

    private String description;

    private Boolean enable;

    private String group;

    private Date createTime;

    private String createUser;

    private Date updateTime;

    private String updateUser;
    
    private boolean compare(String s1, String s2)
    {
    	return ((s2== null) && (s1==null)) || (s2 != null && s1 != null && s2.compareTo(s1)==0);
    }

    private boolean compare(Boolean s1, Boolean s2)
    {
    	return ((s2== null) && (s1==null)) || (s2 != null && s1 != null && s2==s1);
    }
    
    public boolean isChanged(SysParam param)
    {
    	return (!compare(param.paramKey, paramKey)) || 
    			(!compare(param.description, description)) || 
    			(!compare(param.paramValue, paramValue)) || 
    			(!compare(param.paramType, paramType)) || 
    			(!compare(param.enable, enable)) || 
    			(!compare(param.group, group));
    }

    public Long getParamId() {
        return paramId;
    }

    public void setParamId(Long paramId) {
        this.paramId = paramId;
    }

    public String getParamKey() {
        return paramKey;
    }

    public void setParamKey(String paramKey) {
        this.paramKey = paramKey;
    }

    public String getParamValue() {
        return paramValue;
    }

    public void setParamValue(String paramValue) {
        this.paramValue = paramValue;
    }

    public String getParamType() {
        return paramType;
    }

    public void setParamType(String paramType) {
        this.paramType = paramType;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

	public Integer getParamInt() {
		return paramInt;
	}

	public void setParamInt(Integer paramInt) {
		this.paramInt = paramInt;
	}
}
